# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName : zsj.py
# @Time     : 2024/4/11 22:10
# @Author   : Robot-Zsj
"""
description:

input
93,95,97,100,102,123,155
110
output
6
"""
import bisect

nums = list(map(int, input().split(",")))
target = int(input())

idx = bisect.bisect_left(nums, target)

print(idx + 1)
